load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_kotlin",
    sha256 = "34e8c0351764b71d78f76c8746e98063979ce08dcf1a91666f3f3bc2949a533d",
    url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.5/rules_kotlin-v1.9.5.tar.gz",
)

load("@rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories", "versions")

kotlin_repositories()

load("@rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")

kt_register_toolchains()

http_archive(
    name = "rules_android",
    sha256 = versions.ANDROID.SHA,
    strip_prefix = "rules_android-%s" % versions.ANDROID.VERSION,
    urls = ["https://github.com/bazelbuild/rules_android/archive/v%s.zip" % versions.ANDROID.VERSION],
)

load("@rules_android//android:rules.bzl", "android_sdk_repository")

android_sdk_repository(name = "androidsdk")

android_ndk_repository(name = "androidndk")

# Skylib, for build_test, so don't bother initializing the unit test infrastructure.
http_archive(
    name = "bazel_skylib",
    sha256 = versions.SKYLIB_SHA,
    urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/%s/bazel-skylib-%s.tar.gz" % (
        versions.SKYLIB_VERSION,
        versions.SKYLIB_VERSION,
    )],
)

http_archive(
    name = "rules_pkg",
    sha256 = versions.PKG.sha256,
    url = "https://github.com/bazelbuild/rules_pkg/releases/download/%s/rules_pkg-%s.tar.gz" % (
        versions.PKG.version,
        versions.PKG.version,
    ),
)

http_archive(
    name = "rules_jvm_external",
    sha256 = versions.RULES_JVM_EXTERNAL_SHA,
    strip_prefix = "rules_jvm_external-%s" % versions.RULES_JVM_EXTERNAL_TAG,
    url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (
        versions.RULES_JVM_EXTERNAL_TAG,
        versions.RULES_JVM_EXTERNAL_TAG,
    ),
)

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
    artifacts = [
        "com.google.dagger:dagger:2.50",
        "com.google.dagger:dagger-compiler:2.50",
        "com.google.dagger:dagger-producers:2.50",
        "com.squareup.anvil:compiler:2.4.9",
        "com.squareup.anvil:annotations:2.4.9",
        "androidx.activity:activity:1.0.0",
        "androidx.annotation:annotation:1.1.0",
        "androidx.appcompat:appcompat-resources:1.1.0",
        "androidx.appcompat:appcompat:1.1.0",
        "androidx.arch.core:core-common:2.1.0",
        "androidx.arch.core:core-runtime:2.0.0",
        "androidx.cardview:cardview:1.0.0",
        "androidx.collection:collection:1.1.0",
        "androidx.coordinatorlayout:coordinatorlayout:1.1.0",
        "androidx.core:core-ktx:1.3.0",
        "androidx.core:core:1.3.0",
        "androidx.cursoradapter:cursoradapter:1.0.0",
        "androidx.customview:customview:1.0.0",
        "androidx.drawerlayout:drawerlayout:1.0.0",
        "androidx.fragment:fragment:1.1.0",
        "androidx.interpolator:interpolator:1.0.0",
        "androidx.lifecycle:lifecycle-common:2.1.0",
        "androidx.lifecycle:lifecycle-livedata-core:2.0.0",
        "androidx.lifecycle:lifecycle-livedata:2.0.0",
        "androidx.lifecycle:lifecycle-runtime:2.1.0",
        "androidx.lifecycle:lifecycle-viewmodel:2.1.0",
        "androidx.loader:loader:1.0.0",
        "androidx.recyclerview:recyclerview:1.1.0",
        "androidx.savedstate:savedstate:1.0.0",
        "androidx.transition:transition:1.2.0",
        "androidx.vectordrawable:vectordrawable-animated:1.1.0",
        "androidx.vectordrawable:vectordrawable:1.1.0",
        "androidx.versionedparcelable:versionedparcelable:1.1.0",
        "androidx.viewpager2:viewpager2:1.0.0",
        "androidx.viewpager:viewpager:1.0.0",
        "com.google.android.material:material:1.1.0",
        "javax.inject:javax.inject:1",
        "junit:junit:4.13",
        "org.jetbrains.kotlin:kotlin-test:1.5.10",
        "com.google.truth:truth:1.0.1",
        "org.jetbrains:annotations:13.0",
    ],
    excluded_artifacts = [
        "org.jetbrains.kotlin:kotlin-stdlib",
        "org.jetbrains.kotlin:kotlin-stdlib-jdk8",
        "org.jetbrains.kotlin:kotlin-stdlib-jdk7",
        "org.jetbrains.kotlin:kotlin-compiler-embeddable",
        "org.jetbrains.kotlin:kotlin-reflect",
        "org.jetbrains.kotlin:kotlin-script-runtime",
    ],
    repositories = [
        "https://maven.google.com",
        "https://repo1.maven.org/maven2",
    ],
)
